﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;
using System.Xml.Serialization;

namespace ServerExplorer.SharePointConnections.SharepointSiteInfo.Entities
{
    [Serializable]
    [XmlRoot("SiteInfo")]
    public class SiteStructInfo
    {
        private Web _rootWeb;

        private string _siteName;

        private WebPartsAllocation _webPartsAllocation;

        [XmlAttribute("Name")]
        public string SiteName
        {
            get { return _siteName; }
            set { _siteName = value; }
        }

        [XmlElement("RootWeb")]
        public Web RootWeb
        {
            get { return _rootWeb; }
            set { _rootWeb = value; }
        }

        [XmlElement("WebPartTypes")]
        public WebPartsAllocation WebPartsAllocation
        {
            get { return _webPartsAllocation; }
            set { _webPartsAllocation = value; }
        }

        public SiteStructInfo()
        {
            SiteName = "Url";
            RootWeb = new Web();
            RootWeb.IsRootWeb = false;
            WebPartsAllocation = new WebPartsAllocation();
        }
    }
}
